# Contributor: Olliver Schinagl <oliver@schinagl.nl>
# Maintainer: Olliver Schinagl <oliver@schinagl.nl>
pkgname=ibmswtpm2
pkgver=1682
pkgrel=1
pkgdesc="Software implementation of the TCG TPM 2.0 specification by IBM"
url="https://ibmswtpm.sourceforge.net/ibmswtpm2.html"
arch="all"
license="MIT"
makedepends="musl-dev openssl-dev>3"
options="!check"  # No selftest available
source="https://downloads.sourceforge.net/project/ibmswtpm2/ibmtpm$pkgver.tar.gz
	openssl-3.1.patch
	"
builddir="$srcdir/src"

build() {
	make
}

package() {
	install -D -m 0655 -t "$pkgdir/usr/bin" \
	        "$builddir/tpm_server"
}

sha512sums="
564c2154e5459cbbf4ec052bea7909d1eaff0aa07b291c7de44b1204ecfda3c4156fa18da4499e4202b8772b54ae30d0c7c89bd12cd415f3882d17c8d340686d  ibmtpm1682.tar.gz
a815b71ae92e7375ef3d63e4a0b3efa4130a5c6a2371e175f2c7ac865073509e1936ce44aa22e8d2ef6a21018406599245bf99cc536771f24de10c8dc8ef73fe  openssl-3.1.patch
"
